<?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content=
    "application/xhtml+xml; charset=iso-8859-1" />
    <title>
      Tcsh-6.22.02
    </title>
    <link rel="stylesheet" type="text/css" href="../stylesheets/lfs.css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.79.1" />
    <link rel="stylesheet" href="../stylesheets/lfs-print.css" type=
    "text/css" media="print" />
  </head>
  <body class="blfs" id="blfs-9.1">
    <div class="navheader">
      <h4>
        Beyond Linux<sup>�</sup> From Scratch <span class="phrase">(System
        V</span> Edition) - Version 9.1
      </h4>
      <h3>
        Chapter&nbsp;7.&nbsp;Shells
      </h3>
      <ul>
        <li class="prev">
          <a accesskey="p" href="dash.html" title="Dash-0.5.10.2">Prev</a>
          <p>
            Dash-0.5.10.2
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="zsh.html" title="zsh-5.8">Next</a>
          <p>
            zsh-5.8
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="shells.html" title=
          "Chapter&nbsp;7.&nbsp;Shells">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Beyond Linux� From Scratch     (System V Edition) - Version 9.1">Home</a>
        </li>
      </ul>
    </div>
    <div class="sect1" lang="en" xml:lang="en">
      <h1 class="sect1">
        <a id="tcsh" name="tcsh"></a>Tcsh-6.22.02
      </h1>
      <div class="package" lang="en" xml:lang="en">
        <h2 class="sect2">
          Introduction to Tcsh
        </h2>
        <p>
          The <span class="application">Tcsh</span> package contains
          <span class="quote">&ldquo;<span class="quote">an enhanced but
          completely compatible version of the Berkeley Unix C shell
          (<span class=
          "command"><strong>csh</strong></span>)</span>&rdquo;</span>. This
          is useful as an alternative shell for those who prefer C syntax to
          that of the <span class="command"><strong>bash</strong></span>
          shell, and also because some programs require the C shell in order
          to perform installation tasks.
        </p>
        <p>
          This package is known to build and work properly using an LFS-9.1
          platform.
        </p>
        <h3>
          Package Information
        </h3>
        <div class="itemizedlist">
          <ul class="compact">
            <li class="listitem">
              <p>
                Download (FTP): <a class="ulink" href=
                "ftp://ftp.astron.com/pub/tcsh/tcsh-6.22.02.tar.gz">ftp://ftp.astron.com/pub/tcsh/tcsh-6.22.02.tar.gz</a>
              </p>
            </li>
            <li class="listitem">
              <p>
                Download MD5 sum: f34909eab33733aecc05d27adc82277b
              </p>
            </li>
            <li class="listitem">
              <p>
                Download size: 984 KB
              </p>
            </li>
            <li class="listitem">
              <p>
                Estimated disk space required: 13 MB (with tests)
              </p>
            </li>
            <li class="listitem">
              <p>
                Estimated build time: 0.2 SBU (with tests)
              </p>
            </li>
          </ul>
        </div>
        <p class="usernotes">
          User Notes: <a class="ulink" href=
          "http://wiki.linuxfromscratch.org/blfs/wiki/tcsh">http://wiki.linuxfromscratch.org/blfs/wiki/tcsh</a>
        </p>
      </div>
      <div class="installation" lang="en" xml:lang="en">
        <h2 class="sect2">
          Installation of Tcsh
        </h2>
        <p>
          Install <span class="application">Tcsh</span> by running the
          following commands:
        </p>
        <pre class="userinput">
<kbd class="command">./configure --prefix=/usr --bindir=/bin &amp;&amp;

make &amp;&amp;
sh ./tcsh.man2html</kbd>
</pre>
        <p>
          To test the results, issue: <span class="command"><strong>make
          check</strong></span>.
        </p>
        <p>
          Now, as the <code class="systemitem">root</code> user:
        </p>
        <pre class="root">
<kbd class="command">make install install.man &amp;&amp;

ln -v -sf tcsh   /bin/csh &amp;&amp;
ln -v -sf tcsh.1 /usr/share/man/man1/csh.1 &amp;&amp;

install -v -m755 -d          /usr/share/doc/tcsh-6.22.02/html &amp;&amp;
install -v -m644 tcsh.html/* /usr/share/doc/tcsh-6.22.02/html &amp;&amp;
install -v -m644 FAQ         /usr/share/doc/tcsh-6.22.02</kbd>
</pre>
      </div>
      <div class="commands" lang="en" xml:lang="en">
        <h2 class="sect2">
          Command Explanations
        </h2>
        <p>
          <em class="parameter"><code>--bindir=/bin</code></em>: This
          installs the <span class="command"><strong>tcsh</strong></span>
          program in <code class="filename">/bin</code> instead of
          <code class="filename">/usr/bin</code>.
        </p>
        <p>
          <span class="command"><strong>sh ./tcsh.man2html</strong></span>:
          This creates HTML documentation from the formatted man page.
        </p>
        <p>
          <span class="command"><strong>ln -v -sf tcsh
          /bin/csh</strong></span>: The FHS states that if there is a
          <span class="application">C</span> shell installed, there should be
          a symlink from <code class="filename">/bin/csh</code> to it. This
          creates that symlink.
        </p>
      </div>
      <div class="configuration" lang="en" xml:lang="en">
        <h2 class="sect2">
          Configuring Tcsh
        </h2>
        <div class="sect3" lang="en" xml:lang="en">
          <h3 class="sect3">
            <a id="tcsh-config" name="tcsh-config"></a>
          </h3>
          <h4 class="title">
            <a id="tcsh-config" name="tcsh-config"></a>Config Files
          </h4>
          <p>
            There are numerous configuration files for the C shell. Examples
            of these are <code class="filename">/etc/csh.cshrc</code>,
            <code class="filename">/etc/csh.login</code>, <code class=
            "filename">/etc/csh.logout</code>, <code class=
            "filename">~/.tcshrc</code>, <code class=
            "filename">~/.cshrc</code>, <code class=
            "filename">~/.history</code>, <code class=
            "filename">~/.cshdirs</code>, <code class=
            "filename">~/.login</code>, and <code class=
            "filename">~/.logout</code>. More information on these files can
            be found in the <code class="filename">tcsh(1)</code> man page.
          </p>
        </div>
        <div class="sect3" lang="en" xml:lang="en">
          <h3 class="sect3"></h3>
          <h4 class="title">
            <a id="idm45779281242576" name=
            "idm45779281242576"></a>Configuration Information
          </h4>
          <p>
            Update <code class="filename">/etc/shells</code> to include the C
            shell program names (as the <code class="systemitem">root</code>
            user):
          </p>
          <pre class="root">
<kbd class="command">cat &gt;&gt; /etc/shells &lt;&lt; "EOF"
<code class="literal">/bin/tcsh
/bin/csh</code>
EOF</kbd>
</pre>
          <p>
            The following <code class="filename">~/.cshrc</code> provides two
            alternative colour prompts and coloured <span class=
            "command"><strong>ls</strong></span> output. If you prefer a
            global modification, issue the command as the <code class=
            "systemitem">root</code> user, replacing <code class=
            "filename">~/.cshrc</code> by <code class=
            "filename">/etc/csh.cshrc</code>.
          </p>
          <pre class="userinput">
<kbd class="command">cat &gt; ~/.cshrc &lt;&lt; "EOF"
<code class="literal"># Original at:
# https://www.cs.umd.edu/~srhuang/teaching/code_snippets/prompt_color.tcsh.html

# Modified by the BLFS Development Team.

# Add these lines to your ~/.cshrc (or to /etc/csh.cshrc).

# Colors!
set     red="%{\033[1;31m%}"
set   green="%{\033[0;32m%}"
set  yellow="%{\033[1;33m%}"
set    blue="%{\033[1;34m%}"
set magenta="%{\033[1;35m%}"
set    cyan="%{\033[1;36m%}"
set   white="%{\033[0;37m%}"
set     end="%{\033[0m%}" # This is needed at the end...

# Setting the actual prompt.  Two separate versions for you to try, pick
# whichever one you like better, and change the colors as you want.
# Just don't mess with the ${end} guy in either line...  Comment out or
# delete the prompt you don't use.

set prompt="${green}%n${blue}@%m ${white}%~ ${green}%%${end} "
set prompt="[${green}%n${blue}@%m ${white}%~ ]${end} "

# This was not in the original URL above
# Provides coloured ls
alias ls ls --color=always

# Clean up after ourselves...
unset red green yellow blue magenta cyan yellow white end</code>
EOF</kbd>
</pre>
        </div>
      </div>
      <div class="content" lang="en" xml:lang="en">
        <h2 class="sect2">
          Contents
        </h2>
        <div class="segmentedlist">
          <div class="seglistitem">
            <div class="seg">
              <strong class="segtitle">Installed Program:</strong>
              <span class="segbody">tcsh</span>
            </div>
            <div class="seg">
              <strong class="segtitle">Installed Libraries:</strong>
              <span class="segbody">None</span>
            </div>
            <div class="seg">
              <strong class="segtitle">Installed Directory:</strong>
              <span class="segbody">/usr/share/doc/tcsh-6.22.02</span>
            </div>
          </div>
        </div>
        <div class="variablelist">
          <h3>
            Short Descriptions
          </h3>
          <table border="0" class="variablelist">
            <colgroup>
              <col align="left" valign="top" />
              <col />
            </colgroup>
            <tbody>
              <tr>
                <td>
                  <p>
                    <a id="tcsh-prog" name="tcsh-prog"></a><span class=
                    "term"><span class=
                    "command"><strong>tcsh</strong></span></span>
                  </p>
                </td>
                <td>
                  <p>
                    is an enhanced but completely compatible version of the
                    Berkeley Unix C shell, <span class=
                    "command"><strong>csh</strong></span>. It is usable as
                    both an interactive shell and a script processor.
                  </p>
                </td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
      <p class="updated">
        Last updated on 2020-02-17 18:27:03 -0800
      </p>
    </div>
    <div class="navfooter">
      <ul>
        <li class="prev">
          <a accesskey="p" href="dash.html" title="Dash-0.5.10.2">Prev</a>
          <p>
            Dash-0.5.10.2
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="zsh.html" title="zsh-5.8">Next</a>
          <p>
            zsh-5.8
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="shells.html" title=
          "Chapter&nbsp;7.&nbsp;Shells">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Beyond Linux� From Scratch     (System V Edition) - Version 9.1">Home</a>
        </li>
      </ul>
    </div>
  </body>
</html>
